package com.rainbow.validate

import org.springframework.web.context.request.ServletWebRequest

interface ValidateCodeRepository {

    /**
     * 保存验证码
     */
    fun save(request: ServletWebRequest, code: ValidateCode, validateCodeType: ValidateCodeType)


    /**
     * 获取验证码
     */
    fun get(request: ServletWebRequest, validateCodeType: ValidateCodeType): ValidateCode?


    /**
     * 移除验证码
     */
    fun remove(request: ServletWebRequest, validateCodeType: ValidateCodeType)
}